<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;

/**
 * 商品目录表
 *
 * @package App\Models
 *
 */
class Category extends Model
{
    protected $guarded = [];

    public function goods()
    {
        return $this->hasMany(Goods::class)->where([
            'status' => Goods::STATUS_ON_SALE,
        ])->limit(10);
    }
}
